package i_thread;

import java.util.Random;

public class Bank {
	int amt=1000;
	
	public void input(int a){

		amt += a; //입금
		prn();
		Random r = new Random();
		try{
			Thread.sleep(r.nextInt(30));
		}catch(Exception ex){}
	}
	public void output(int a){
		amt -= a; // 출금
		prn();
	}

	public void prn(){
		System.out.println("현 잔액 : " + amt);
	}

}
